package com.meituan;

import java.util.Scanner;

/**
 * @ClassName Main
 * @Description
 * @Author xinggh
 * @Date 2020/8/15 19:33
 * @Version 1.0
 **/
public class Main {


    public int uniquePaths(int m, int n) {
        int[][] dp = new int[11][11];
        for (int i = 0; i <= n; i++) {
            dp[0][i] = 1;
        }
        for (int i = 0; i <= m; i++) {
            dp[i][0] = 1;
        }
        for (int i = 1; i <= m; i++) {
            for (int j = 1; j <= n; j++) {
                dp[i][j] = dp[i - 1][j] + dp[i][j - 1];
            }
        }
        return dp[m][n];
    }


    public static long count(int n) {
        if (n <= 0) return 0;
        long[] dp = new long[n + 1];
        dp[0] = 1;
        //这里int[]千万不要少了[]这个括号....
        int[] coins = new int[]{1, 5, 10, 20, 50, 100};
        for (int i = 0; i < coins.length; i++) {
            for (int j = coins[i]; j <= n; j++) {
                dp[j] = dp[j] + dp[j - coins[i]];
            }
        }
        return dp[n];

    }


    public static String add(String s1, String s2) {
        int i = s1.length() - 1;
        int j = s2.length() - 1;
        int add = 0;
        StringBuilder sb = new StringBuilder();
        while (i >= 0 || j >= 0) {
            int n1 = i >= 0 ? s1.charAt(i) - '0' : 0;
            int n2 = j >= 0 ? s2.charAt(j) - '0' : 0;
            int tem = n1 + n2 + add;
            add = tem /10;
            sb.append(tem % 10);
            i--;
            j--;
        }
        if (add == 1) {
            sb.append("1");
        }
        return sb.reverse().toString();

    }


    public static void main(String[] args) {

        Main main = new Main();
        //  System.out.println(main.uniquePaths(3, 2));

       /* Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int n = sc.nextInt();
            System.out.println(count(n));
        }*/

        System.out.println(add("99", "Callable38"));
    }

}
